Pseudo area lights

ABSTRACT

Computer animators have, till now, largely relegated themselves to using point light sources when simulating directional light sources in computer graphics and animation. The illumination achieved is computationally feasible but not totally realistic. While it is possible to use a finite light source of given size and shape to achieve a more realistic effect, the radiosity analysis required to calculate the illumination effect of such a light source is so cumbersome that it cannot be used for real-time computer animation. The described invention allows the animator to approximate the illumination effect of a finite light source by using a point source of varying location and intensity. Another embodiment of the invention allows the animator to realistically simulate ambient light by a similar method. The resulting illumination effects are comparable to those achieved with full radiosity analyses at much lower computational loads.

FIELD OF THE INVENTION

[0001] The invention relates generally to the art of computer graphicsand animation. More particularly, the invention relates to efficientapproximation of finite light sources using point light sources ofvarying location and intensity.

BACKGROUND OF THE INVENTION

[0002] In order to render a scene in computer graphics or computeranimation, computer artists and animators often will place one or morelight sources within the scene in order to illuminate it. If, forinstance, an animator wished to render a room that was lit by two lightbulbs, he or she would construct two light sources, representing thelight bulbs, and then calculate the illumination effect of these twosources. The standard construct for such directional light sources isthe point source, whereby all light is considered to emanate from asingle point.

[0003] The point source is the standard construct because calculation ofits illumination effect is computationally straightforward. For anygiven surface point within the scene, the rendering method need onlycalculate the effect of a single ray of light, which has a singulardirection and intensity. The disadvantage of using the point source isits lack of realism. When illuminated by a point source, any surfacepoint in the scene will either be illuminated by the point light source,or else wholly hidden from it. As a result, shadows and other partiallighting conditions are rendered in an unrealistically sharp, binarymanner (see FIG. 5).

[0004] One alternative to using a point light source is to use a finitesource, one that has an extended shape and size. The light emerging froma finite source will emanate from its entire surface, and not just asingle point. Finite sources illuminate a scene in a much more realisticmanner. Some surface points will be illuminated by the entire finitelight source, others totally hidden from it. More important is the factthat some points will be partially illuminated by the source.

[0005] Despite this superior effect, computer artists and animators donot currently use finite light sources to illuminate their graphics andtheir scenes. Determination of the total contributing light from afinite light source to a surface point, has, till this point, required anumerical integration over the entire surface of the finite source. Suchcalculations are simply too cumbersome to be practically used incomputer animation. Finite light sources are sometimes used toilluminate single computer-generated scenes or “photos” when a highlyrealistic image is desired and computational speed is not an issue, buteven in these situations the computational burden is considered onerous.

[0006] Computer artists and animators run into analogous problems whenattempting to simulate ambient light such as skylight. Realisticcalculations with respect to simulated ambient light sources are alsotoo cumbersome to make them practical. The conventional technique forsimulating ambient light, therefore, is to simply turn up the brightnessthroughout an entire scene, with perhaps gross modifications forsurfaces points that obviously will be differentially affected by thelight (such as those under dark shadows). The computation required forthis is straightforward, even trivial, but the illumination effect isagain not very realistic.

SUMMARY OF THE INVENTION

[0007] The invention relates to a method for approximating theillumination effect of a finite light source by a using a point lightsource of varying intensity and location. These two variables aremanipulated depending on the “visibility” of the finite light sourcefrom the perspective of the surface point being rendered. The result isrealistic illumination with minimal computational effort.

BRIEF DESCRIPTION OF THE DRAWINGS

[0008]FIG. 1 shows generally the elements of a computer system suitablefor carrying out the present invention.

[0009]FIG. 2 shows the main steps involved in rendering acomputer-animated scene.

[0010]FIG. 3 shows the main steps involved in rendering the surfaceswithin a computer-animated scene.

[0011]FIG. 4 shows the main steps involved in illuminating and shading arendered surface within a computer-animated scene.

[0012]FIG. 5 shows illustrates the problem of unrealistically sharpshadows created by a point light source.

[0013]FIG. 6 shows the “terminator region” of partial illumination on anobject surface.

[0014]FIG. 7 shows the method for choosing a point light source basedupon the surface point in question, which results in a particular lightvector direction

[0015]FIG. 8 shows the method for determining the light intensity basedupon the portion of the finite light source which is hidden.

[0016]FIG. 9 shows two examples of pseudo-centers used to calculatelight vector directions for given points in the terminator region.

[0017]FIG. 10 shows the method of determining the light intensity andlight vector direction for a given point under an infinite hemisphere oflight, based upon the known tangent plane and normal.

DETAILED DESCRIPTION OF TWO EXEMPLARY EMBODIMENTS: FINITE LIGHT SOURCEAPPROXIMATION AND INFINITE HEMISPHERE ILLUMINATION

[0018]FIG. 1 shows a computer system suitable for carrying out theinvention. A main bus 1 is connected to one or more CPUs 2 and a mainmemory 3. Also connected to the bus are a keyboard 4 and large diskmemory 5. The frame buffer 6 receives output information from the mainbus and sends it through another bus 7 to either a CRT or anotherperipheral which writes the image directly onto film. The computersystem is used to approximate the illumination effect of a finite lightsource and an infinite hemisphere light source. The main steps incarrying out the rendering and illumination of a scene are shown inFIGS. 2-4.

[0019] One exemplary embodiment of the invention involves use of adirectional light source for general illumination within a scene. Such alight source might be the only light source within a scene, it might bethe primary source (supplemented by secondary light sources) or it mightbe one of a number of primary light sources (such as a number ofsimulated light bulbs).

[0020]FIG. 6 shows a spherical light source illuminating the surface ofan object. Spheres are perhaps the most useful shapes to use as lightsources because they create an illumination effect similar to that ofmany real-life directional light sources, such as light bulbs.Computation of their illumination effect, whether by explicitintegration or approximation, as in the described invention, is alsousually simpler than it is with other shapes. The object to beilluminated is, for illustrative purposes, also shown as a sphere.

[0021] With respect to the top of the illuminated object, we can drawtwo tangents between the light sphere and the object, defining points P₀and P₁. Points to the right of P₀ are wholly hidden from the lightsphere, and thus not illuminated. Points to the left of P₁ are whollyilluminated, which means they receive the total illumination of thelight sphere. Calculation of both the light intensity and the lightvector direction for these points is straightforward (light intensitybeing some chosen function and vector direction being the vector betweenthe center of the light sphere, C, and the point P being considered).

[0022] The points P₀ and P₁ define a terminator region, within which allpoints are partially illuminated by the light sphere (note that thisterminator region is actually an extended band that circles the sphere,with points analogous to P₀ and P₁ defining its boundaries). No and N₁are the corresponding normals at those points. Determining theillumination effect by radiosity analysis for each of these points wouldrequire a numerically complex integration over the portion of the lightsphere that illuminates the points. The described invention approximatesthese calculations with results that are almost indistinguishable fromthe numerically complex integration.

[0023]FIG. 7 shows a tangent plane, Ts, drawn from one of the points Pin the terminator region to the light sphere. The tangent plane can beextended further, so that it cuts through the light sphere. Viewed fromthe side, plane Ts appears as a tangent line (see FIG. 7).

[0024] The portion of the projected disk that is above Ts is above the“horizon line” as seen from point P, and thus considered to shine uponthat point. The portion of the light sphere below Ts is below thehorizon line, and thus considered hidden from point P.

[0025] Comparing Ts with the line drawn from point P to the center ofthe light sphere, line Ps, it follows that θ, the angle between Ts andPs, is arccos (−Ps·N)−π/2 and that D, the distance between the center ofthe light sphere and the line Ts, is tan (θ)×Ps. The vector direction ofthe light from the truncated sphere to the object can be approximated bycreating a “pseudo-center” X with respect to the light sphere.Pseudo-center X is determined by shifting the center of the lightsphere, C, a distance D in the direction given by the vector Ps×(N×Ps).

[0026] The vector from this newly defined X to point P defines thevector direction of light used to illuminate point P (see FIG. 7).

[0027] The intensity of light reaching the point P will depend on thearea of the projection of the truncated light source on a planeperpendicular to the line Ps. That area can in turn be approximated bythe area of the truncated sphere projected onto the plane perpendicularto the tangent plane Ts containing the line Ps which is the projectionshown in FIGS. 7 and 8.

[0028] The intensity of the constructed point source at X that is usedto illuminate point P in the terminator region is thus calculated as afunction of the portion of the light sphere that is above the horizon,which is also determined from D. We can see in FIG. 8 that the areas ofthe light sphere visible from point P are areas Z, A and A′. Area Z issimply one-half the area of the disk. Area A is the sum of areas F andG, and the area of A′=A. The area of F is D(R²-D²)^(½)/2 and the area ofG is [R²arcsin(D/R)]/2. These trigonometric calculations can in practicebe approximated by the function T²(3−2T), where T is defined as(D+R)/2R.

[0029] The described invention thus uses a point light source of varyinglocation and intensity to approximate the effect of a finite lightsource. FIG. 9 shows the pseudo-center X, standing alone as a pointsource, in order to illuminate point P. FIG. 9 also shows anotherpseudo-center X′ derived by the same method and used to illuminate pointP′. The invention achieves an illumination effect similar to that oftrue radiosity analysis at a computational cost comparable to thatrequired for a point source.

[0030] Note that in this embodiment of the invention, the vectordirection of the light is drawn from the pseudo-center X, and not fromsome pseudo-surface point at a given radius as one might expect. Thissimplification helps reduce the computational load. When the radius ofthe finite light source is small compared to the distance between thesource and the surface it illuminates, the simplification does notdiminish the realism of the effect.

[0031] A second exemplary embodiment of the invention is used tosimulate ambient light such as skylight. This embodiment first requiresthe construction of a lighted hemisphere of infinite radius within ascene. The illumination effect of the hemisphere is then approximatedusing point sources of varying location to achieve a realistic lighteffect.

[0032] In FIG. 10, we can see the lighted hemisphere that encloses theanimated scene like a dome, as well as a point P within that scene. Todetermine the intensity of ambient light that shines upon that point, wefirst derive the tangent plane and the normal vector, N, to that point(usually from the function that is used to draw P). If we extend thistangent plane so that it reaches out to infinity and intersects thehemisphere, we can see that only a portion of the hemisphere canactually shine light upon point P. That fraction is 1×arccos(N·L), whereL is a vector that points toward a chosen “pole” of the hemisphere. Theintensity is a simple (usually direct) function of that portion.

[0033] The vector direction of light shining upon point P is determinedby using the centroid of that portion of the hemisphere cut by thetangent plane. In FIG. 10, we see the centroid O, which is determined bythe vector addition of N and L. This centroid then acts a point lightsource with respect to point P. The vector from O to P defines thevector direction of light. The infinite radius of the light hemisphereserves as a fiction to determine the position of the point O.

[0034] The specific arrangements and methods described herein are merelyillustrative of the principles of the present invention. Numerousmodifications in form and detail may be made by those of ordinary skillin the art without departing from the scope of the present invention.Although this invention has been shown in relation to particularembodiments, it should not be considered so limited. Rather, the presentinvention is limited only by the scope of the appended claims.

What is claimed is:
 1. A method for illuminating surfaces in computergraphics comprising the steps of: constructing one or more finite lightsources within a computer animated scene, each of the finite lightsources having a finite size and a center; constructing a plurality ofsurfaces with the scene, each surface consisting of a plurality ofpoints; and approximation of the illumination effect of each of thefinite light sources by the use of a plurality of point light sources ofvarying intensity.
 2. The method of claim 1 wherein a portion of each ofthe light sources illuminates each of the points.
 3. The method of claim2 comprising the further step of approximately calculating a lightintensity and a light vector direction as a function of the portion ofeach of the light sources which illuminates each of the points.
 4. Themethod of claim 3 comprising the further step of calculating the lightintensity as a function of the portion of the light source whichilluminates each of the points.
 5. The method of claim 4 comprising thefurther step of approximating the light vector direction as a functionof the portion of the light source shines upon the point.
 6. The methodof claim 1 wherein said finite light source is a sphere.
 7. A method forilluminating surfaces in computer graphics comprising the steps of:constructing a hemispherical light source of infinite radius;constructing a plurality of surfaces with said scene, said surfacesconsisting of a plurality of points. approximation of the illuminationeffect of each of the hemispherical light source by the use of aplurality of point light sources.
 8. The method of claim 7 , comprisingthe further step of calculating a light intensity and a light vectordirection as a function of a portion of the light source whichilluminates each of the points.
 9. The method of claim 8 wherein saidlight vector direction is a function of the portion of saidhemispherical light source which shines upon said point.
 10. The methodof claim 9 wherein said light intensity is a function of the portion ofsaid hemispherical light source which shines upon said point.